<!DOCTYPE html>

<html>
    <head>
        <title>TODO supply a title</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <style>
            div{width:100px;height:100px;background:blue;}
        </style>
    </head>
    <body>
        <div>这是一个div</div>
        <script src="js/jquery.min.js" type="text/javascript"></script>
        <script type="text/javascript">
            $("div").toggle(
                    function () {$("div").css({"background": "green"});},
                    function () {$("div").css({"background": "red"});}
//                    function () {$("div").css({"background": "yellow"});},
                    );
        </script>

    </body>
</html>
